﻿
@{
    Layout = null;
}
<style>
    .fpop_bg {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 2;
        width: 100%;
        background: url(/Content/images/bt_bg.png) repeat top center;
        display: none;
    }
</style>
<div ng-controller="ActSuccessController">
    <div class="w_paySucess">
        <img src="/Content/images/sc_ewm1.png" class="w_paySucess_img" />
        <div class="w_paySu_more">
            <div class="w_paySuMore_hint">您已成功付款，扫码关注优品三悦公众号</div>
            <p class="w_paySumore_a">
                <a ng-click="$state.go('shop.index')" class="w_paysys_index">返回首页</a>
                <a href="javascript:void(0)" class="w_paysys_look">分享好友</a>
            </p>
        </div>
    </div>
    <!-- 弹出层 -->
    <div class="fpop_bg"></div>
    <!-- 弹出提示 -->
    <img src="/Content/images/24.png" alt="点击右上角分享" class="toShareImg" style="position: absolute;top:0;right: 0;width: 90%;display: none;z-index:2">
</div>
<!--end 弹出提示 -->
<!--end 弹出层 -->
<script>
    $(".fpop_bg").click(function () {
        $(".fpop_bg").hide();
        $(".toShareImg").hide();
    })
    $(".w_paysys_look").click(function () {
        $(".fpop_bg").show();
        $(".toShareImg").show();
    })
    App.controller('ActSuccessController', [
                '$scope', '$state', '$route', '$http', '$stateParams', '$rootScope',
                    function ($scope, $state, $route, $http, $stateParams, $rootScope) {


                        $http.post("/Order/GetOrderInfo", { id: $stateParams.id }).then(function (response) {
                            debugger
                        
                            $scope.Order = angular.copy(response.data.data);
                            $scope.Act = angular.copy(response.data.data1);
                            $scope.member = angular.copy(response.data.data2);
                            if ($scope.Order.OrderType == 4) {
                                $scope.Url = 'http://wx.youpinsanyue.com/#/activity/activity/activityteaminfo/' + $scope.member.ActivityTeamId;
                                $scope.ShareTittle = $scope.Act.ActivityName;
                                $scope.ShareImg = $scope.Act.CoverImg;
                            } else if ($scope.Order.OrderType == 2) {
                                $scope.Url = 'http://wx.youpinsanyue.com/#/activity/dropgroup/groupheadinfo/' + $scope.member.GroupHeadID;
                                $scope.ShareTittle = $scope.Act.Title;
                                $scope.ShareImg = $scope.Act.CoverImg;
                            }
                            var tt = function () {
                                $rootScope.WxShare($scope.ShareTittle, '您的好友邀请您来参团啦', $scope.Url, $rootScope.ImgHostUrl + $scope.ShareImg);
                            }

                            setTimeout(tt, 1000)

                        });
                    }
    ]);

</script>
